<template>
    <input :type="type" :placeholder="placeholder" :value="value" @input="iptChange">
</template>

<script>
export default {
    name: '',
    props: {
        type: {
            type:String,
            default: 'text'
        },

        placeholder: {
            type: String,
            default: '请输入'
        },

        value: {
            type: String,
            default: ''
        }
    },
    data() { 
        return {

        }
    },
    created() {

    },
    methods:{
        iptChange(e) {
            let value = e.target.value
            this.$emit('input', value)
        }
    },
}
</script>

<style scoped>
input {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    padding-left: 10px;
    border-radius: 8px;
}
</style>